/* Error Codes [Speech recognition gets -5100 through -5199] */
enum {
eSRNotAvailable = -5100, /* the service requested is not avail or applicable */
eSRInternalError = -5101, /* a system internal or hardware error condition */
eSRComponentNotFound = -5102, /* a needed system resource was not located */
eSROutOfMemory = -5103, /* an out of memory error occurred in MacPlainTalk space */
eSROutOfTempMemory = -5104, /* an out of memory error occurred in Temporary memory space */
eSRBadParameter = -5105, /* an invalid parameter was specified */
eSRParamOutOfRange = -5106, /* when we say 0-100, don't pass in 101. */
eSRBadSelector = -5107, /* an unrecognized selector was specified */
eSRBufferTooSmall = -5108, /* returned from attribute access functions */
eSRCantTrackClient = -5109, /* an error occurred while tracking client process */
eSRCantGetSRSystem = -5110, /* the requested system could not be located/initialized */
eSRCantSetProperty = -5111, /* a non-settable property was specified */
eSRCantGetProperty = -5112, /* a non-gettable property was specified */
eSRCantSetDuringRecognition = -5113, /* the property can't be set while recognition is in progress -- do before or between utterances. */
eSRAlreadyListening = -5114, /* in response to SRStartListening */
eSRNotListeningState = -5115, /* in response to SRStopListening */
eSRModelMismatch = -5116, /* no acoustical models are avail to match request */
eSRNoClientLanguageModel = -5117, /* trying to access a non-specified LanguageModel */
eSRNoPendingUtterances = -5118, /* nothing to continue search on */
eSRRecognitionAborted = -5119, /* an abort error occurred during search */
eSRRecognitionDone = -5120, /* search has finished, but nothing was recognized */
eSRBadObject = -5121, /* expecting an object as specified in API */
eSRHasNoSubItems = -5122, /* SRCountItems or related routine was called on an object without subelements -- e.g. a word -- rather than phrase, path, or LM. */
eSRSubItemNotFound = -5123, /* returned when accessing a non-existent sub item of a container */
eSRLanguageModelTooBig = -5124, /* Cant build language models so big */
eSRAlreadyReleased = -5125, /* this object has already been released before */
eSRAlreadyFinished = -5126, /* the language model can't be finished twice */
eSRWordNotFound = -5127, /* the spelling couldn't be found in lookup(s) */
eSRNotFinishedWithRejection = -5128, /* property not found because the LMObj is not finished with rejection */
eSRExpansionTooDeep = -5129, /* Language model is left recursive or is embedded too many levels */
eSRTooManyElements = -5130, /* Too many elements added to phrase or path or other langauge model object */
eSRCantAdd = -5131 /* Can't add given type of object to the base LMObject (e.g.in SRAddLMObject) */
};
/* Type Definitions */
typedef unsigned long SpeechObject;
typedef SpeechObject RecognitionSystem;
typedef SpeechObject Recognizer;
typedef SpeechObject SpeechSource;
typedef SpeechSource RecognitionResult;
typedef SpeechObject LMObject; /* an LMWord, LMPhrase or LanguageModel */
typedef LMObject LanguageModel;
typedef LMObject LMPath;
typedef LMObject LMPhrase;
typedef LMObject LMWord;
typedef unsigned long LMFlags;
typedef unsigned short SpeedSetting; /* between 0 and 100 */
typedef unsigned short RejectionLevel; /* between 0 and 100 */
typedef unsigned long UtteranceLength; /* a length measure in mS */
typedef unsigned long UtteranceCount; /* the number of queueable utterances */
/* When an event occurs, the user supplied proc will be called with a pointer
to the param passed in and a flag to indicate conditions such
as interrupt time or system background time.
*/
#if defined(powerc) || defined (__powerc)
#pragma options align=mac68k
#endif
struct SRCallBackStruct {
long what; /* one of notification flags */
long message; /* contains RecognitionResult id */
Recognizer instance; /* ID of recognizer being notified */
OSErr status; /* result status of last search */
short flags; /* non-zero if occurs during interrupt */